package test;

import dto.OrdenDeCompra;

public class Inicio {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		
		/*		SessionFactory sf = HibernateUtil.getSessionFactory();
		Session s = sf.openSession();
		s.beginTransaction();
		Double total = (Double) s.createQuery("select sum(i.cantidad * p.precio)  as total from OrdenCompra o inner join o.items i inner join i.material m inner join m.precios p where o.numero = 1").uniqueResult();
		System.out.println(total);
		s.getTransaction().commit();
		s.close();*/
	
	new Sistema().materialesSinOC();
	
	OrdenDeCompra orden = new OrdenDeCompra();
	orden.setNumero(2);	
	new Sistema().totalOrdenCompra(orden);
	
	new Sistema().proveedoreMasMateriales();
	
	}

}
